<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    /*  Error    通用错误

    EvalError
    与eval()有关， 当调用 eval() 失败时抛出。
    RangeError
    数值变量或参数超出了其有效范围
    ReferenceError
    一个无效的引用(eg: strict模式下引用了一个未声明的变量等)
    SyntaxError
    当 JavaScript 语法错误时抛出。
    TypeError
    变量或参数不属于有效类型 */

    var err = new Error("This is a error!");
    var err = new RangeError("Please entry a number between 0 and 100!");
    var err = new ReferenceError("Please entry a number between 0 and 100!");
    var err = new SyntaxError("Punexpect token > in JSON at JSON.parse()");
    var err = new TypeError("mysqli_query() parameter 1 need Mysqli Object,bool give in");
    console.log(err);

    throw err;
    console.log("这是错误后的代码");
</script>

</html>